home *** CD-ROM | disk | FTP | other *** search
/ Developer CD Series 1998 April: Mac OS SDK / Dev.CD Apr 98 SDK2.toast / Development Kits (Disc 2) / ScriptX / Code Samples / untested / tcpip / browser / bug2.sx < prev    next >
Encoding:
Text File  |  1996-05-21  |  353 b   |  23 lines  |  [TEXT/ttxt]

  1. --<<<
  2.  
  3. if not (isdefined tcpstream) do process (new loader) "loadable/web"
  4.  
  5. function bug0 -> (
  6.     local x := new tcpstream host: "198.186.9.22" port: 80
  7.     plug x
  8. )
  9.  
  10. function bug1 -> (
  11.     local x := new tcpstream host: "www" port: 80
  12.     local t := ((read x) &)
  13.     threadyieldto t
  14.     threadyieldto t
  15.     plug x
  16. )
  17.  
  18. function domany n f ->
  19.     for i in 1 to n do f()
  20.     
  21. -->>
  22.  
  23.